<div class="ad-contract" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>合约中心</li>
        <li >广告合约</li>
    </ol>
    <div class="panel">
        <div class="searchWapper">
            <div class="form-group searchLump search-condition">
                <div class="searchTitle">筛选：</div>
                <div class="btn btn-xs condition" ng-repeat="(key,value) in search" ng-if="payType[value]||contractType[value]&&(key=='contractType'||key=='payType')">
                    <a href="javascript:void(0);" class="close" ng-click="deletes(key)">
                        <span aria-hidden="true">&times;</span>
                    </a>
                    {{contractType[value]}}
                    {{payType[value]}}
                </div>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">有效期：</div>
                <input ims-select-range-time="rangeDate" type="text" style="margin-top: 10px">


            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">合约类型：</div>
                <label class="btn btn-xs" ng-class="{on : search.contractType == key}" ng-repeat="(key, value) in contractType">
                    <input type="radio" class="hide"  name="radioStatus"  ng-value="key" ng-model="search.contractType" ng-change="searchChange()">{{value}}
                </label>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">支付方式：</div>
                <label class="btn btn-xs" ng-class="{on : search.payType == key}" ng-repeat="(key, value) in payType">
                    <input type="radio" class="hide"  name="radioStatus"  ng-value="key" ng-model="search.payType" ng-change="searchChange()">{{value}}
                </label>
            </div>
        </div>
        <div class="bg-20"></div>
        <div class="panel-heading panel-style">
            <div class="row panel-row">
                <div class="col-lg-3">
                    <div class="input-group input-group-sm">
                        <input type="text" class="form-control" name="keyword" ng-model="keyword" placeholder="搜索">
						<span class="input-group-btn btn-bearch">
							<button class="btn btn-default" type="button" ng-click="searchClick(keyword)">
                                <i class="glyphicon glyphicon-search"></i>
                            </button>
						</span>
                    </div>
                </div>
                 <div class="search-operation pull-right">
                     <a ui-sref="adContracts.detail" class="btn">
                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                     </a>
                     <a href="javascript:void(0);" class="btn" ng-click="deleteAd()">
                         <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                     </a>
                 </div>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>序号	</th>
                    <th>广告合约ID</th>
                    <th>广告主</th>
                    <th>广告有效期</th>
                    <th>广告类型</th>
                    <th>广告总额(万元)</th>
                    <th>支付方式</th>
                    <th>广告计划</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in adContractsList">
                    <td><input type="checkbox" ng-model="item.checked" class="magic-checkbox" id="{{'ADContractList' + ($index + 1)}}">
                        <label for="{{'ADContractList' + ($index + 1)}}"></label>
                    </td>
                    <td>{{(paginationConf.currentPage - 1) * paginationConf.itemsPerPage + $index + 1}}</td>
                    <td><a ui-sref="adContracts.detail({id:item.id})">{{item.id}}</a></td>
                    <td>{{item.shortName}}</td>
                    <td><span>{{item.scheduleStart}}</span>~<span>{{item.scheduleEnd}}</span></td>
                    <td>{{table[item.contractType]}}</td>
                    <td>{{item.contractTotal}}</td>
                    <td>{{table[item.payType]}}</td>
                    <td><a>{{item.campaignNum}}</a></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationConf"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
